package com.swak.router;

/**
 * 方法级别的处理器
 * 
 * @author lifeng
 */
public class CommandFunction implements HandlerFunction<Command> {

	@Override
	public Object handle(Command request) {
		return request.getPath();
	}

	public static RouterFunction<Command> of(String command) {
		CommandFunction methodFunction = new CommandFunction();
		return RouterFunctions.path(command, methodFunction);
	}
}
